gtk4.git
5 years agogtk/window: Remove gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 09:25:22 +0000 (10:25 +0100)]
gtk/window: Remove gtk_window_resize()

Use gtk_window_set_default_size() or change the size of the widget
inside the window to get the same effect.

5 years agotestsuite: Remove test for gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 13:17:29 +0000 (14:17 +0100)]
testsuite: Remove test for gtk_window_resize()

And use gtk_window_set_default_size() in the other place.

5 years agotests/testgtk: Remove 'Resize' button
Jonas Ådahl [Wed, 2 Dec 2020 09:21:12 +0000 (10:21 +0100)]
tests/testgtk: Remove 'Resize' button

The gtk_window_resize() API is going away, so remove this test.

5 years agotests/animated-resizing: Resize widget instead of window
Jonas Ådahl [Wed, 2 Dec 2020 09:18:04 +0000 (10:18 +0100)]
tests/animated-resizing: Resize widget instead of window

This means the window needs to be marked as non-resizable, otherwise it
won't shrink.

5 years agotests: Use gtk_window_set_default_size() when appropriate
Jonas Ådahl [Wed, 2 Dec 2020 09:08:46 +0000 (10:08 +0100)]
tests: Use gtk_window_set_default_size() when appropriate

Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.

5 years agogtk/expander: Remove manual call to gtk_window_resize()
Jonas Ådahl [Wed, 2 Dec 2020 08:56:55 +0000 (09:56 +0100)]
gtk/expander: Remove manual call to gtk_window_resize()

It happens implicitly for a non-resizeable window.

5 years agogdk/x11: Flush layout changes to the frame clack dispatch
Jonas Ådahl [Wed, 2 Dec 2020 08:45:31 +0000 (09:45 +0100)]
gdk/x11: Flush layout changes to the frame clack dispatch

This follows the trail of the Wayland backend in that GdkSurface changes
happen during the layout phase, and that a GDK_CONFIGURE no longer being
used to communicate the size changes of a surface; this now also uses
the layout signal on the GdkSurface.

5 years agogdk/surface: Try to reschedule pending phase until dispatched
Jonas Ådahl [Wed, 2 Dec 2020 08:39:48 +0000 (09:39 +0100)]
gdk/surface: Try to reschedule pending phase until dispatched

If a surface scheduled a relayout, got frozen, and a layout phase
happened, then got unfrozen, it wouldn't see it's layout being
requested; avoid this race by remembering the pending phases until they
actually happened.

5 years agogdk/surface: Make backends aware of when layout is requested
Jonas Ådahl [Wed, 2 Dec 2020 08:12:01 +0000 (09:12 +0100)]
gdk/surface: Make backends aware of when layout is requested

5 years agox11: Remove handling of 'substructure' events
Jonas Ådahl [Tue, 1 Dec 2020 10:10:59 +0000 (11:10 +0100)]
x11: Remove handling of 'substructure' events

Reading the comment, it seems to be related being a window manager
decoration utility; this is not something GTK4 aims to handle, just drop
support for this.

5 years agowayland: Layout drag icon from GdkSurface::layout
Jonas Ådahl [Wed, 25 Nov 2020 14:06:09 +0000 (15:06 +0100)]
wayland: Layout drag icon from GdkSurface::layout

5 years agogtk/dragicon: Don't show until child is set
Jonas Ådahl [Wed, 25 Nov 2020 14:02:26 +0000 (15:02 +0100)]
gtk/dragicon: Don't show until child is set

Showing before the child would result in bogus
gdk_drag_surface_present() with an "empty" (1x1) size. This can easily
be avoided by postponing showing until there is anything to show.

5 years agowayland: Communicate popup layout changes via GdkSurface::layout
Jonas Ådahl [Wed, 25 Nov 2020 10:48:08 +0000 (11:48 +0100)]
wayland: Communicate popup layout changes via GdkSurface::layout

By moving popup layout emission to the layout phase, the current
GdkPopup::poup-layout-changed signal has no value on its own as it'd be
ignored by GtkPopover.

Make the Wayland backend communicate the popup layout changes via the
common signal; but leave the rest intact until other backends catch up.

5 years agowayland/surface: Restructure fields used for the next layout
Jonas Ådahl [Wed, 25 Nov 2020 10:28:45 +0000 (11:28 +0100)]
wayland/surface: Restructure fields used for the next layout

Put them in a anonymous struct, and separate the toplevel specific ones
into another anonymous struct inside the first one. Later popup related
fields will be added.

5 years agogdk/surface: Remove left-over signal enum value
Jonas Ådahl [Wed, 25 Nov 2020 10:14:33 +0000 (11:14 +0100)]
gdk/surface: Remove left-over signal enum value

The popup-layout-change signal was moved to GdkPopup, but the enum was
never removed from GdkSurface.

5 years agogdk/frame-clock: Remove the newly added 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 22:18:42 +0000 (23:18 +0100)]
gdk/frame-clock: Remove the newly added 'compute-size' phase

What was previously done in the layout phase is now done in response to
a GdkSurface signal, which means size computation can happen on layout.

5 years agowayland/surface: Compute size on layout
Jonas Ådahl [Tue, 24 Nov 2020 22:16:48 +0000 (23:16 +0100)]
wayland/surface: Compute size on layout

Stop using the 'compute-size' phase of the frame clock, use the layout
phase instead, now that GTK isn't using the layout phase anymore.

5 years agoPass the layout signal via GdkSurface to GtkRoot
Jonas Ådahl [Tue, 24 Nov 2020 21:02:53 +0000 (22:02 +0100)]
Pass the layout signal via GdkSurface to GtkRoot

Don't have GtkRoot listen directly to the layout signal on the frame
clock, but let it pass through GdkSurface. This will allow GdkSurface to
be more involved in the layout phase.

5 years agogdk/surface: Make pending schedule a phase enum
Jonas Ådahl [Tue, 24 Nov 2020 21:00:38 +0000 (22:00 +0100)]
gdk/surface: Make pending schedule a phase enum

Scheduling an update when frozen would reschedule when unfrozen; change
this to a generic pending phase enum, and use this for resrcheduling
paint and compute-size.

5 years agogtk/root: Validate css node after update
Jonas Ådahl [Tue, 24 Nov 2020 17:33:05 +0000 (18:33 +0100)]
gtk/root: Validate css node after update

It should happen before layout, but after the animation tick, thus after
the update.

5 years agowayland: Concentrate size computation to 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 15:05:26 +0000 (16:05 +0100)]
wayland: Concentrate size computation to 'compute-size' phase

This includes computing the surface size, including shadow margin,
setting the surface size, during the 'compute-size' clock phase.

5 years agowayland/surface: Don't save uninitialized size
Jonas Ådahl [Tue, 24 Nov 2020 21:58:02 +0000 (22:58 +0100)]
wayland/surface: Don't save uninitialized size

GdkSurface's are initialized to have the size 1x1, as otherwise we'd
receive an X11 error, would a corresponding X11 window be created.

This confuses the "saved size" mechanisms in the Wayland backend, as
treats 0 as uninitialized, and not 1.

Fix this simply not saving size that if it's smaller or equal than 1.

5 years agogdk/surface: Add API to request 'compute-size' clock phase
Jonas Ådahl [Tue, 24 Nov 2020 15:03:07 +0000 (16:03 +0100)]
gdk/surface: Add API to request 'compute-size' clock phase

5 years agogdk/surface: Use helper to emit 'size-changed' signal
Jonas Ådahl [Tue, 24 Nov 2020 15:02:23 +0000 (16:02 +0100)]
gdk/surface: Use helper to emit 'size-changed' signal

5 years agogdk/toplevelsize: Add way to set margin
Jonas Ådahl [Tue, 24 Nov 2020 14:51:56 +0000 (15:51 +0100)]
gdk/toplevelsize: Add way to set margin

Will be used to communicate the shadow margin, instead of using
gdk_surface_set_shadow_width().

Also set these values in gtkwindow.c.

5 years agoframe-clock: Add 'compute-size' phase
Jonas Ådahl [Tue, 24 Nov 2020 14:02:35 +0000 (15:02 +0100)]
frame-clock: Add 'compute-size' phase

This will be handled between 'update' (which may trigger animation
ticks, CSS update, etc) and 'layout' which will allocate the widget
tree. It's meant to perform surface size computation, and is done
between these two phases in order to have an up to date state, and
letting the layout phase have an up to date size to layout in.

5 years agogtk/window: Let the backend handle toplevel freezing
Jonas Ådahl [Mon, 23 Nov 2020 20:08:40 +0000 (21:08 +0100)]
gtk/window: Let the backend handle toplevel freezing

5 years agowayland: Apply new surface state at the beginning of a frame
Jonas Ådahl [Mon, 23 Nov 2020 16:26:06 +0000 (17:26 +0100)]
wayland: Apply new surface state at the beginning of a frame

Concentrate state application to the start of a frame; this is to avoid
having GTK going back and forth between different state if so would
happen between two frames.

5 years agosurface: Only keep state 'withdrawn' after hiding
Jonas Ådahl [Mon, 23 Nov 2020 16:23:44 +0000 (17:23 +0100)]
surface: Only keep state 'withdrawn' after hiding

A hidden surface should start from a clean slate when showing again, so
clear any now out of date state.

5 years agowayland: Keep pending initial state separate
Jonas Ådahl [Mon, 23 Nov 2020 15:46:29 +0000 (16:46 +0100)]
wayland: Keep pending initial state separate

Queue it, and then wait for it to actually take effect, i.e. be
confirmed via a configure event from the compositor, before setting the
actual GdkSurface::state value.

5 years agogdk/surface: Add API to queue and apply state changes
Jonas Ådahl [Mon, 23 Nov 2020 15:39:11 +0000 (16:39 +0100)]
gdk/surface: Add API to queue and apply state changes

This will be used to compress state changes and apply as part of a frame
clock dispatch.

5 years agogdk/surface: Removed unused struct field
Jonas Ådahl [Mon, 23 Nov 2020 15:13:45 +0000 (16:13 +0100)]
gdk/surface: Removed unused struct field

The 'old_state' wasn't used anywhere, lets remove it.

5 years agogtk/window: Don't gdk_toplevel_present() if not mapped
Jonas Ådahl [Fri, 20 Nov 2020 16:11:44 +0000 (17:11 +0100)]
gtk/window: Don't gdk_toplevel_present() if not mapped

That would map the window too early.

5 years agogdk/toplevel: Make gdk_toplevel_present() async
Jonas Ådahl [Fri, 20 Nov 2020 15:56:36 +0000 (16:56 +0100)]
gdk/toplevel: Make gdk_toplevel_present() async

The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.

Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.

5 years agowayland: Only set mapped state when mapped
Jonas Ådahl [Thu, 19 Nov 2020 09:54:20 +0000 (10:54 +0100)]
wayland: Only set mapped state when mapped

Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.

5 years agowayland/popup: Use maybe_notify_mapped() helper
Jonas Ådahl [Thu, 19 Nov 2020 09:43:22 +0000 (10:43 +0100)]
wayland/popup: Use maybe_notify_mapped() helper

5 years agowayland: Decouple mapped state from surface creation
Jonas Ådahl [Thu, 19 Nov 2020 09:40:42 +0000 (10:40 +0100)]
wayland: Decouple mapped state from surface creation

5 years agoMerge branch 'wayland-inhbit0' into 'master'
Emmanuele Bassi [Mon, 7 Dec 2020 00:26:50 +0000 (00:26 +0000)]
Merge branch 'wayland-inhbit0' into 'master'

wayland: avoid referencing unallocated memory when uninhibiting

See merge request GNOME/gtk!2927

5 years agowayland: avoid referencing unallocated memory when uninhibiting
Michael Terry [Sun, 6 Dec 2020 23:36:58 +0000 (18:36 -0500)]
wayland: avoid referencing unallocated memory when uninhibiting

5 years agoUpdate British English translation
Zander Brown [Sun, 6 Dec 2020 22:08:30 +0000 (22:08 +0000)]
Update British English translation

5 years agoMerge branch 'ebassi/a11y-leak' into 'master'
Emmanuele Bassi [Sat, 5 Dec 2020 20:52:04 +0000 (20:52 +0000)]
Merge branch 'ebassi/a11y-leak' into 'master'

a11y: Plug a leak in the AT-SPI context

Closes #3450

See merge request GNOME/gtk!2926

5 years agoa11y: Plug a leak in the AT-SPI context
Emmanuele Bassi [Sat, 5 Dec 2020 20:25:30 +0000 (20:25 +0000)]
a11y: Plug a leak in the AT-SPI context

Fixes: #3450
5 years agoUpdate contribution guide
Matthias Clasen [Sat, 5 Dec 2020 16:34:52 +0000 (11:34 -0500)]
Update contribution guide

Make my feelings about bug reporting by screencast known.

5 years agoMerge branch 'revert-round-windows' into 'master'
Matthias Clasen [Sat, 5 Dec 2020 15:10:16 +0000 (15:10 +0000)]
Merge branch 'revert-round-windows' into 'master'

Revert "theme: Round all window corners"

See merge request GNOME/gtk!2921

5 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 5 Dec 2020 14:05:48 +0000 (15:05 +0100)]
Update POTFILES.in

5 years agoMerge branch 'wip/jfelder/customsorter-null' into 'master'
Emmanuele Bassi [Fri, 4 Dec 2020 23:39:48 +0000 (23:39 +0000)]
Merge branch 'wip/jfelder/customsorter-null' into 'master'

customsorter: Add missing nullable annotation

See merge request GNOME/gtk!2923

5 years agocustomsorter: Add missing nullable annotation
Jean Felder [Fri, 4 Dec 2020 23:04:36 +0000 (00:04 +0100)]
customsorter: Add missing nullable annotation

5 years agoMerge branch 'wip/chergert/gdk-macos-for-master' into 'master'
Emmanuele Bassi [Fri, 4 Dec 2020 22:37:00 +0000 (22:37 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'

macos: fix GL renderer for macOS

Closes #3420

See merge request GNOME/gtk!2922

5 years agomacos: enable GL renderer by default
Christian Hergert [Fri, 4 Dec 2020 21:41:31 +0000 (13:41 -0800)]
macos: enable GL renderer by default

Now that the attribute locations are fixed for the GL renderer, we can
enable it by default on macOS.

Fixes #3420

5 years agogl: specify attribute locations for vUv and aPosition
Christian Hergert [Fri, 4 Dec 2020 21:33:34 +0000 (13:33 -0800)]
gl: specify attribute locations for vUv and aPosition

These positions are not guaranteed to be in a specific order when linked
into the final GPU program. They need to be specified so that our code
in gskglrenderer.c can use known positions for them to match up with
our GskQuadVertex.

This fixes the GL renderer on macOS's OpenGL shader compiler.

Fixes #3420

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 4 Dec 2020 17:21:56 +0000 (17:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

emoji chooser: Fix incremental loading

Closes #3438

See merge request GNOME/gtk!2920

5 years agodocs: Fix up GtkPicture docs
Matthias Clasen [Fri, 4 Dec 2020 16:39:13 +0000 (11:39 -0500)]
docs: Fix up GtkPicture docs

These were missing proper linking.

5 years agoRevert "theme: Round all window corners"
Matthias Clasen [Fri, 4 Dec 2020 16:13:26 +0000 (11:13 -0500)]
Revert "theme: Round all window corners"

This reverts commit e46522e4b522aa163ca757436dc948b1d989530d.

5 years agoemoji chooser: Fix incremental loading
Matthias Clasen [Fri, 4 Dec 2020 15:58:24 +0000 (10:58 -0500)]
emoji chooser: Fix incremental loading

This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().

Fixes: #3438
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 4 Dec 2020 04:12:41 +0000 (04:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2918

5 years agogtk-demo: Use a native filechooser in the words demo
Matthias Clasen [Fri, 4 Dec 2020 03:31:05 +0000 (22:31 -0500)]
gtk-demo: Use a native filechooser in the words demo

5 years agoMerge branch 'picture-docs2' into 'master'
Benjamin Otte [Fri, 4 Dec 2020 02:04:19 +0000 (02:04 +0000)]
Merge branch 'picture-docs2' into 'master'

Add docs about sizing pictures

See merge request GNOME/gtk!2917

5 years agoAdd docs about sizing pictures
Benjamin Otte [Fri, 4 Dec 2020 02:04:19 +0000 (02:04 +0000)]
Add docs about sizing pictures

Suggested by Christopher Davis.

5 years agogtk-demo: Use a native file chooser in the svg demo
Matthias Clasen [Fri, 4 Dec 2020 00:44:45 +0000 (19:44 -0500)]
gtk-demo: Use a native file chooser in the svg demo

5 years agogtk-demo: Use a native filechooser in the video demo
Matthias Clasen [Fri, 4 Dec 2020 00:36:53 +0000 (19:36 -0500)]
gtk-demo: Use a native filechooser in the video demo

5 years agogtk-demo: Remove empty row in the pickers demo
Matthias Clasen [Fri, 4 Dec 2020 00:24:19 +0000 (19:24 -0500)]
gtk-demo: Remove empty row in the pickers demo

The file chooser button is gone.

5 years agoMerge branch 'wip/chergert/macos-decelerate' into 'master'
Emmanuele Bassi [Thu, 3 Dec 2020 22:54:46 +0000 (22:54 +0000)]
Merge branch 'wip/chergert/macos-decelerate' into 'master'

macos: fix typo when creating scroll events

Closes #3418

See merge request GNOME/gtk!2916

5 years agomacos: fix typo when creating scroll events
Christian Hergert [Thu, 3 Dec 2020 21:44:14 +0000 (13:44 -0800)]
macos: fix typo when creating scroll events

This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.

This fixes deceleration of kinetic scrolling on the macOS backend.

Fixes #3418

5 years agoMerge branch 'wip/chergert/gdk-macos-for-master' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 20:07:16 +0000 (20:07 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'

macos: fix motion event delivery after closing transient window

Closes #3419

See merge request GNOME/gtk!2910

5 years agoMerge branch 'wip/chergert/shadertoy-macos-fix' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 19:00:39 +0000 (19:00 +0000)]
Merge branch 'wip/chergert/shadertoy-macos-fix' into 'master'

demos: make alienplanet demo work on macOS OpenGL

See merge request GNOME/gtk!2915

5 years agodemos: make alienplanet demo work on macOS OpenGL
Christian Hergert [Thu, 3 Dec 2020 18:20:11 +0000 (10:20 -0800)]
demos: make alienplanet demo work on macOS OpenGL

On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.

This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.

With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).

5 years agoMerge branch 'wip/otte/conic' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 17:14:01 +0000 (17:14 +0000)]
Merge branch 'wip/otte/conic' into 'master'

Implement a GL shader for conic gradients

See merge request GNOME/gtk!2913

5 years agoMerge branch 'wip/tintou/gdk-backends-header' into 'master'
Emmanuele Bassi [Thu, 3 Dec 2020 12:32:24 +0000 (12:32 +0000)]
Merge branch 'wip/tintou/gdk-backends-header' into 'master'

build: Use the correct path to the header of the wayland and x11 backends

See merge request GNOME/gtk!2914

5 years agoglrenderer: Implement a shader for conic gradients
Benjamin Otte [Thu, 3 Dec 2020 05:02:18 +0000 (06:02 +0100)]
glrenderer: Implement a shader for conic gradients

5 years agorendernode: Fix some wrong constants for conic gradients
Benjamin Otte [Thu, 3 Dec 2020 05:00:21 +0000 (06:00 +0100)]
rendernode: Fix some wrong constants for conic gradients

copy/paste from other nodes left some wrong values in there and that
screwed things up quite a bit.

5 years agoglrenderer: Emit more useful error messages
Benjamin Otte [Thu, 3 Dec 2020 04:33:30 +0000 (05:33 +0100)]
glrenderer: Emit more useful error messages

Catch the error when it happens, so that we can emit a specific and more
helpful error message.

Also verify that all branches in the code now do indeed set a proper
GError when they fail, so that the final catch-all is no longer needed.
Instead, assert that the error is set so that we catch future code
additions early that do not set the GError.

5 years agobuild: Use the correct path to the header of the wayland and x11 backends
Corentin Noël [Thu, 3 Dec 2020 09:02:03 +0000 (10:02 +0100)]
build: Use the correct path to the header of the wayland and x11 backends

5 years agoNEWS: Updates
Matthias Clasen [Thu, 3 Dec 2020 04:10:39 +0000 (23:10 -0500)]
NEWS: Updates

5 years agoMerge branch 'wip/otte/conic' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 03:54:24 +0000 (03:54 +0000)]
Merge branch 'wip/otte/conic' into 'master'

Add support for conic gradients

See merge request GNOME/gtk!2911

5 years agomacos: plug leak of application windows
Christian Hergert [Thu, 3 Dec 2020 03:42:07 +0000 (19:42 -0800)]
macos: plug leak of application windows

This ensures that we don't leak window references inside the action muxer.
Otherwise, we risk not disposing the windows upon gtk_window_destroy()
and blocking the main loop from quitting.

Fixes #3419

5 years agomuxer: add helper to get group by name
Christian Hergert [Thu, 3 Dec 2020 03:41:16 +0000 (19:41 -0800)]
muxer: add helper to get group by name

This is useful when you need to read a group back out of the muxer.

5 years agomacos: ensure element is part of queue
Christian Hergert [Thu, 3 Dec 2020 00:53:05 +0000 (16:53 -0800)]
macos: ensure element is part of queue

We don't want to risk decrementing length field unless this is actually
part of the queue.

5 years agomacos: maintain GList element consistency
Christian Hergert [Thu, 3 Dec 2020 00:51:31 +0000 (16:51 -0800)]
macos: maintain GList element consistency

We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.

5 years agomacos: send focus-out event to windowing
Christian Hergert [Wed, 2 Dec 2020 21:44:23 +0000 (13:44 -0800)]
macos: send focus-out event to windowing

5 years agomacos: freeze updates until surface is mapped
Christian Hergert [Wed, 2 Dec 2020 21:10:23 +0000 (13:10 -0800)]
macos: freeze updates until surface is mapped

This more closely matches the X11 backend in terms of freezing
updates on the surface initially until we get mapped.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 3 Dec 2020 03:43:19 +0000 (03:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3429

See merge request GNOME/gtk!2912

5 years agocss: Add support for conic-gradient()
Benjamin Otte [Thu, 3 Dec 2020 00:24:45 +0000 (01:24 +0100)]
css: Add support for conic-gradient()

This comes complete with animation support. For a good time, try:

@keyframes conic {
  100% { background-image: conic-gradient(from 1turn, red, lime, blue, yellow, red); }
}

window {
  background-image: conic-gradient(red, lime, blue, yellow, red);
  animation: conic infinite linear 5s;
}

5 years agoMerge branch 'wip/otte/diediedie' into 'master'
Benjamin Otte [Thu, 3 Dec 2020 01:31:39 +0000 (01:31 +0000)]
Merge branch 'wip/otte/diediedie' into 'master'

Remove GtkFileChooserButton

See merge request GNOME/gtk!2909

5 years agogtk: Remove GtkFileChooserButton
Benjamin Otte [Wed, 2 Dec 2020 19:15:28 +0000 (20:15 +0100)]
gtk: Remove GtkFileChooserButton

... as discussed in the meeting.

5 years agodocs: Remove mentions of <accelerator>
Matthias Clasen [Thu, 3 Dec 2020 00:59:44 +0000 (19:59 -0500)]
docs: Remove mentions of <accelerator>

That is no longer supported, keyboard shortcuts
are done with GtkShortcut now.

Fixes: #3429
5 years agogtk-demo: Add a search button
Matthias Clasen [Thu, 3 Dec 2020 00:53:55 +0000 (19:53 -0500)]
gtk-demo: Add a search button

Easter eggs are great, but search shouldn't be one.

5 years agosnapshot: Add gsk_snapshot_append_conic_gradient()
Benjamin Otte [Thu, 3 Dec 2020 00:15:53 +0000 (01:15 +0100)]
snapshot: Add gsk_snapshot_append_conic_gradient()

5 years agogsk: Add GskConicGradientNode
Benjamin Otte [Wed, 2 Dec 2020 23:47:54 +0000 (00:47 +0100)]
gsk: Add GskConicGradientNode

5 years agoMerge branch 'fix/keyboard-input' into 'master'
Matthias Clasen [Wed, 2 Dec 2020 22:14:27 +0000 (22:14 +0000)]
Merge branch 'fix/keyboard-input' into 'master'

Gdk4/Win32: Correct calls to gdk_key_event_new()

See merge request GNOME/gtk!2903

5 years agoGdk4/Win32: Correct call to gdk_key_event_new()
Matthew Jakeman [Wed, 2 Dec 2020 22:14:27 +0000 (22:14 +0000)]
Gdk4/Win32: Correct call to gdk_key_event_new()

The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.

5 years agorendernodeparser: Split out a function
Benjamin Otte [Wed, 2 Dec 2020 20:48:35 +0000 (21:48 +0100)]
rendernodeparser: Split out a function

5 years agoMerge branch 'wip/chergert/gdk-macos-for-master' into 'master'
Matthias Clasen [Wed, 2 Dec 2020 20:15:51 +0000 (20:15 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'

Revert "macos: specify a window level for surfaces"

See merge request GNOME/gtk!2908

5 years agoMerge branch 'ebassi/doc-fixes' into 'master'
Emmanuele Bassi [Wed, 2 Dec 2020 20:08:05 +0000 (20:08 +0000)]
Merge branch 'ebassi/doc-fixes' into 'master'

Ebassi/doc fixes

Closes #3428

See merge request GNOME/gtk!2906

5 years agomacos: resign main/key when hiding window
Christian Hergert [Wed, 2 Dec 2020 19:35:22 +0000 (11:35 -0800)]
macos: resign main/key when hiding window

This isn't done automatically for us, so we need to synthesize it in
our hide helper.

With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.

5 years agomacos: disconnect frame clock when destroying surface
Christian Hergert [Wed, 2 Dec 2020 19:35:02 +0000 (11:35 -0800)]
macos: disconnect frame clock when destroying surface

5 years agomacos: track grab serial like other backends
Christian Hergert [Wed, 2 Dec 2020 19:34:31 +0000 (11:34 -0800)]
macos: track grab serial like other backends

This is what is done elsewhere, so copy that here too now that we actually
generate serials for events.

5 years agotests: Remove testsvg
Benjamin Otte [Wed, 2 Dec 2020 18:48:15 +0000 (19:48 +0100)]
tests: Remove testsvg

That demo lives in gtk-demo now.

5 years agoRevert "macos: specify a window level for surfaces"
Christian Hergert [Wed, 2 Dec 2020 19:15:57 +0000 (11:15 -0800)]
Revert "macos: specify a window level for surfaces"

This reverts commit ca8b00e87192570541e33c9320167b1146457210.

This isn't needed and causes issues with other applications getting
stacked beneath our windows.

5 years agoFix transfer of GtkTreeExpander.get_item()
Emmanuele Bassi [Wed, 2 Dec 2020 19:09:10 +0000 (19:09 +0000)]
Fix transfer of GtkTreeExpander.get_item()

We return a full reference to the item.

Fixes: #3428
5 years agodocs: Add missing fields to GtkTextBufferClass
Emmanuele Bassi [Wed, 2 Dec 2020 19:04:43 +0000 (19:04 +0000)]
docs: Add missing fields to GtkTextBufferClass